package edu.xidian.bdilab.jrbigdata.controller.bank;


import edu.xidian.bdilab.jrbigdata.controller.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@Api(tags = {"demandCheck-银行查看企业需求功能-企业申请公示"})
public class DemandCheck {
    @Autowired
    public edu.xidian.bdilab.jrbigdata.service.bank.demandcheck.DemandCheckService DemandCheckService;
    @ApiImplicitParams({
            @ApiImplicitParam(name = "loanLimit", value = "贷款额度(枚举)"),
            @ApiImplicitParam(name = "lowerLimit", value = "利率下限（单位%）"),
            @ApiImplicitParam(name = "upperLimit", value = "利率上限（单位%）"),
            @ApiImplicitParam(name = "loanPeriod", value = "贷款期限（单位：月）"),
            @ApiImplicitParam(name = "guaranteeMode", value = "担保方式"),
    })
    @RequestMapping(value = "bank/demandCheck", method = RequestMethod.POST)
    public ResponseResult Demandcheck(@RequestParam(required = false) Integer loanLimit,
                                      @RequestParam(required = false) Double lowerLimit,
                                      @RequestParam(required = false)  Double upperLimit,
                                      @RequestParam(required = false) Integer loanPeriod,
                                      @RequestParam(required = false) Integer guaranteeMode)
    {
        //System.out.println("fgsfwtfqyqrefgqrfqer");
       ResponseResult responseResult= DemandCheckService.demandcheck(loanLimit,lowerLimit,upperLimit,loanPeriod, guaranteeMode);
       return  responseResult;
    }

}
